import request from "assets/utils/request";
import {
  Loading,
} from 'quasar'
export const loadMusicList = data => {

    return request({
        method: 'post',
        url: '/music/loadmusiclist',
        data
    })
}
export const loadMusicListByType = data => {

    return request({
        method: 'post',
        url: '/music/loadmusiclistbytype',
        data
    })
}
export const loadMusicType = data => {
    return request({
        method: 'post',
        url: '/music/loadmusictype',
        data
    })
}
export const updateMusicType = data => {
  Loading.show({
    customClass: 'mypage-loading',
    message: '<span class="text-white text-weight-bold">加载中...</span>'
  })
    return request({
        method: 'post',
        url: '/music/updatemusictype',
        data
    })
}
export const updateMusicName = data => {
  Loading.show({
    customClass: 'mypage-loading',
    message: '<span class="text-white text-weight-bold">加载中...</span>'
  })
    return request({
        method: 'post',
        url: '/music/updatemusicname',
        data
    })
}
export const updateMusicDuration = data => {
    return request({
        method: 'post',
        url: '/music/updatemusicduration',
        data
    })
}
export const rateMusic = data => {
    return request({
        method: 'post',
        url: '/music/ratemusic',
        data
    })
}
export const addToCollect = data => {
  Loading.show({
    customClass: 'mypage-loading',
    message: '<span class="text-white text-weight-bold">加载中...</span>'
  })
    return request({
        method: 'post',
        url: '/music/addToCollect',
        data
    })
}
export const removeCollect = data => {
  Loading.show({
    customClass: 'mypage-loading',
    message: '<span class="text-white text-weight-bold">加载中...</span>'
  })
    return request({
        method: 'post',
        url: '/music/removeCollect',
        data
    })
}
export const loadCollectionList = data => {
    return request({
        method: 'post',
        url: '/music/loadCollectionList',
        data
    })
}
export const loadCollectionListByFolder = data => {
    return request({
        method: 'post',
        url: '/music/loadCollectionListByFolder',
        data
    })
}
export const removeLike = data => {
    return request({
        method: 'post',
        url: '/music/removeLike',
        data
    })
}
export const addToLike = data => {
    return request({
        method: 'post',
        url: '/music/addToLike',
        data
    })
}
export const loadLikeFolderList = data => {
    return request({
        method: 'post',
        url: '/music/loadLikeFolderList',
        data
    })
}
export const loadLikeList = data => {
    return request({
        method: 'post',
        url: '/music/loadLikeList',
        data
    })
}
export const loadLikeListByFolder = data => {
    return request({
        method: 'post',
        url: '/music/loadLikeListByFolder',
        data
    })
}
export const createLikeFolder = data => {
    return request({
        method: 'post',
        url: '/music/createLikeFolder',
        data
    })
}
export const deleteLikeFolder = data => {
    return request({
        method: 'post',
        url: '/music/deleteLikeFolder',
        data
    })
}
export const updateLikeFolder = data => {
    return request({
        method: 'post',
        url: '/music/updateLikeFolder',
        data
    })
}
export const searchMusicLibrary = data => {
    return request({
        method: 'post',
        url: '/music/searchMusicLibrary',
        data
    })
}
export const loadToProject = data => {
  Loading.show({
    customClass: 'mypage-loading',
    message: '<span class="text-white text-weight-bold">加载中...</span>'
  })
    return request({
        method: 'post',
        url: '/music/loadToProject',
        data
    })
}
export const removeFromProject = data => {
  Loading.show({
    customClass: 'mypage-loading',
    message: '<span class="text-white text-weight-bold">加载中...</span>'
  })
    return request({
        method: 'post',
        url: '/music/removeFromProject',
        data
    })
}

